const Router = require('koa-router');
const router = new Router({
  prefix: '/api/v1/'
});
const controllers = require('../controllers/index');

// 用户模块api
router
  .post('public/login', controllers.user.login)
  .post('public/register', controllers.user.register)
  .put('users/:id', controllers.user.edit)
  .get('users/:id', controllers.user.logout)

// 爬虫
router
  .get('public/reptile/:name/:type', controllers.reptile.getBlockList)

// 用户反馈
router
  .post('public/feedback', controllers.feedback.submit)
  .get('public/feedback', controllers.feedback.list)

// 反馈功能列表
router
  .post('public/options', controllers.options.add)
  .get('public/options/:cid', controllers.options.list)


module.exports = router;